# 使用Node.js官方镜像
FROM node:22.19.0 

# 设定工作目录
WORKDIR /usr/src/app 

# 复制package.json和package-lock.json
COPY package*.json ./ 

# 安装依赖
RUN npx playwright install firefox
RUN npx playwright install-deps
RUN npm i
# 复制应用源代码
COPY . . 

# 暴露端口
EXPOSE 3000 

# 定义容器启动命令
CMD [ "node", "index.js" ] 